package com.hzhr.iot.collect.constant;

/**
 * 报文字段的KEY标志
 * @author 48310
 *
 */
public enum MessageFieldKeyEnum {
	MESSAGE_SIZE(1,"报文长度"),
	FUNCTION_CODE(2,"功能码"),
	TRANSFER_DIR(3,"传送方向"),
	REQ_RESP_FLAG(4,"请求响应标志"),
	IOT_DEVICE_ID(5,"物联网设备编号"),
	MESSAGE_ID(6,"报文编号"),
	ENCRYPTED_BYTE(7,"加密字节"),
	CRC(8,"CRC校验码"),
	DATA_AREA_SIZE(9,"数据域长度"),
	START_CODE(10,"起始码"),
	END_CODE(11,"结束码"),
	FREEZING_DATE(12,"冻结日期"),
	FREEZING_TIME(13,"冻结时间"),
	FREEZING_VALUE_INTEGER_PART(14,"冻结指数_整数部分"),
	FREEZING_VALUE_DECIMAL_PART(15,"冻结指数_小数部分"),
	CURRENT_DATE(16,"当前日期"),
	CURRENT_TIME(17,"当前时间"),
	CURRENT_VALUE_INTEGER_PART(18,"当前指数_整数部分"),
	CURRENT_VALUE_DECIMAL_PART(19,"当前指数_小数部分"),
	VALVE_STATUS(20,"阀门状态"),
	SIGNAL_STRENGTH(21,"信号强度"),
	CELL_VOLTAGE_INTEGER_PART(22,"电池电压_整数部分"),
	ALARM_STAT(23,"异常统计"),
	CELL_VOLTAGE_DECIMAL_PART(24,"电池电压_小数部分"),
	CARD_TYPE(25,"通信卡类型"),
	IMEI_ID(26,"IMEI号"),
	RESPONSE_CODE(27,"响应码"),
	IP(28,"IP地址"),
	PORT(29,"端口号"),
	REPORT_PERIOD(30,"上报周期"),
	WAKE_TIME(31,"每天自醒时间"),
	WAKE_SEC(32,"自醒时长"),
	PEAK_DELAY_SEC(33,"错峰延迟时间"),
	FREEZING_DAY(34,"冻结日"),
	LAST_FRAME_FLAG(35,"最后一帧标志"),
	FRAME_ID(36,"帧序号"),
	FRAME_DETAIL_COUNT(37,"本帧明细条数"),
	ALARM_DATE(38,"异常发生日期"),
	ALARM_TIME(39,"异常发生时间"),
	ALARM_TYPE(40,"异常类型"),
	CURRENT_VALUE(41,"当前指数"),
	FREEZING_VALUE(42,"冻结指数"),
	CELL_VOLTAGE(43,"电池电压"),
	ICCID(44,"ICCID"),
	ECL(45,"信号覆盖等级"),
	RSRQ(46,"信号覆盖强度"),
	RSSI(47,"接收灵敏度(CSQ)"),
	SNR(48,"信噪比"),
	CELLID(49,"基站 ID"),
	PCI(50,"小区标识"),
	EARFCN(51,"频点"),
	RESP_IOT_DEVICE_ID(52,"物联网设备编号_响应"),
	HEART_PERIOD(53,"心跳周期"),
	RESP_HEART_PERIOD(54,"心跳周期_响应"),
	SLAVE_STATION_ID(55,"子站编号"),
	RESP_SLAVE_STATION_ID(56,"子站编号_响应"),
	COLLECT_DEVICE_ID(57,"采集设备编号"),
	RESP_COLLECT_DEVICE_ID(58,"采集设备编号_响应"),
	COLLECT_PERIOD(59,"采集频率"),
	RESP_COLLECT_PERIOD(60,"采集频率_响应"),
	RESP_WAKE_TIME(61,"每天自醒时间_响应"),
	RESP_WAKE_SEC(62,"自醒时长_响应"),
	RESP_PEAK_DELAY_SEC(63,"错峰延迟时间_响应"),
	RESP_STANDARD_FLOW_TOTAL(64,"标况总量_响应"),
	RESP_WORK_FLOW_TOTAL(65,"工况总量_响应"),
	RESP_STANDARD_CURRECTION_FLOW(66,"标况修正量_响应"),
	RESP_STANDARD_FLOW_RATE(67,"标况瞬时量_响应"),
	RESP_WORK_FLOW_RATE(68,"工况瞬时量_响应"),
	RESP_TEMPERATURE(69,"温度_响应"),
	RESP_PRESSURE(70,"压力_响应"),
	RESP_VALVE_STATUS(71,"阀门状态_响应"),
	RESP_CELLVOLTAGE(72,"电池电压_响应"),
	RESP_SIGNAL_STRENGTH(73,"信号强度_响应"),
	STANDARD_FLOW_TOTAL(74,"标况总量"),
	WORK_FLOW_TOTAL(75,"工况总量"),
	STANDARD_CURRECTION_FLOW(76,"标况修正量"),
	STANDARD_FLOW_RATE(77,"标况瞬时量"),
	WORK_FLOW_RATE(78,"工况瞬时量"),
	TEMPERATURE(79,"温度"),
	PRESSURE(80,"压力"),
	DETAIL_COUNT(81,"明细记录总数"),
	ALARM_DETAIL_COUNT(82,"异常明细条数"),
	POWER_SUPPLY_TYPE(83,"电源类型"),
	STANDARD_FLOW_TOTAL_INTEGER_PART(84,"标况总量_整数部分"),
	STANDARD_FLOW_TOTAL_DECIMAL_PART(85,"标况总量_小数部分"),
	WORK_FLOW_TOTAL_INTEGER_PART(86,"工况总量_整数部分"),
	WORK_FLOW_TOTAL_DECIMAL_PART(87,"工况总量_小数部分"),
	STANDARD_CURRECTION_FLOW_INTEGER_PART(88,"标况修正量_整数部分"),
	STANDARD_CURRECTION_FLOW_DECIMAL_PART(89,"标况修正量_小数部分"),
	STANDARD_FLOW_RATE_INTEGER_PART(90,"标况瞬时量_整数部分"),
	STANDARD_FLOW_RATE_DECIMAL_PART(91,"标况瞬时量_小数部分"),
	WORK_FLOW_RATE_INTEGER_PART(92,"工况瞬时量_整数部分"),
	WORK_FLOW_RATE_DECIMAL_PART(93,"工况瞬时量_小数部分"),
	TEMPERATURE_INTEGER_PART(94,"温度_整数部分"),
	TEMPERATURE_DECIMAL_PART(95,"温度_小数部分"),
	PRESSURE_INTEGER_PART(96,"压力_整数部分"),
	PRESSURE_DECIMAL_PART(97,"压力_小数部分"),
	RESP_STANDARD_FLOW_TOTAL_INTEGER_PART(98,"标况总量_整数部分_响应"),
	RESP_STANDARD_FLOW_TOTAL_DECIMAL_PART(99,"标况总量_小数部分_响应"),
	RESP_WORK_FLOW_TOTAL_INTEGER_PART(100,"工况总量_整数部分_响应"),
	RESP_WORK_FLOW_TOTAL_DECIMAL_PART(101,"工况总量_小数部分_响应"),
	RESP_STANDARD_CURRECTION_FLOW_INTEGER_PART(102,"标况修正量_整数部分_响应"),
	RESP_STANDARD_CURRECTION_FLOW_DECIMAL_PART(103,"标况修正量_小数部分_响应"),
	RESP_STANDARD_FLOW_RATE_INTEGER_PART(104,"标况瞬时量_整数部分_响应"),
	RESP_STANDARD_FLOW_RATE_DECIMAL_PART(105,"标况瞬时量_小数部分_响应"),
	RESP_WORK_FLOW_RATE_INTEGER_PART(106,"工况瞬时量_整数部分_响应"),
	RESP_WORK_FLOW_RATE_DECIMAL_PART(107,"工况瞬时量_小数部分_响应"),
	RESP_TEMPERATURE_INTEGER_PART(108,"温度_整数部分_响应"),
	RESP_TEMPERATURE_DECIMAL_PART(109,"温度_小数部分_响应"),
	RESP_PRESSURE_INTEGER_PART(110,"压力_整数部分_响应"),
	RESP_PRESSURE_DECIMAL_PART(111,"压力_小数部分_响应"),
	RESP_VALVE_STATUS_INTEGER_PART(112,"阀门状态_整数部分_响应"),
	RESP_VALVE_STATUS_DECIMAL_PART(113,"阀门状态_小数部分_响应"),
	RESP_CELLVOLTAGE_INTEGER_PART(114,"电池电压_整数部分_响应"),
	RESP_CELLVOLTAGE_DECIMAL_PART(115,"电池电压_小数部分_响应"),
	RESP_CURRENT_DATE(116,"当前日期_响应"),
	RESP_CURRENT_TIME(117,"当前时间_响应"),
	CONTROL_CODE(118,"控制码"),
	UP_KEY(119,"上行密钥"),
	DOWN_KEY(120,"下行密钥"),
	DEVICE_STATUS(121,"设备状态"),
	REQ_FUNCTION_CODE(122,"功能码_请求"),
	RESP_IP(123,"IP地址_响应"),
	RESP_PORT(124,"端口号_响应"),
	RESP_UP_KEY(125,"上行密钥_响应"),
	RESP_DOWN_KEY(126,"下行密钥_响应"),
	REQ_IOT_DEVICE_ID(127,"物联网设备编号_请求"),
	REQ_UNDER_PRESSURE_ALARM_VALUE(128,"欠压报警阈值_请求"),
	REQ_OVER_PRESSURE_ALARM_VALUE(129,"过压报警阈值_请求"),
	RESP_UNDER_PRESSURE_ALARM_VALUE(130,"欠压报警阈值_响应"),
	RESP_OVER_PRESSURE_ALARM_VALUE(131,"过压报警阈值_响应"),
	REQ_NORMAL_COLLECT_FREQUENCY(132,"正常时采样频率_请求"),
	REQ_EXCEPTION_COLLECT_FREQUENCY(133,"异常时采样频率_请求"),
	RESP_NORMAL_COLLECT_FREQUENCY(134,"正常时采样频率_响应"),
	RESP_EXCEPTION_COLLECT_FREQUENCY(135,"异常时采样频率_响应"),
	REQ_NORMAL_REPORT_PERIOD(136,"正常时上报周期_请求"),
	REQ_EXCEPTION_REPORT_PERIOD(137,"异常时上报周期_请求"),
	RESP_NORMAL_REPORT_PERIOD(138,"正常时上报周期_响应"),
	RESP_EXCEPTION_REPORT_PERIOD(139,"异常时上报周期_响应"),
	RESP_ALARM_TYPE(141,"异常类型_响应"),
	RESP_CONCENTRATOR_NO(142, "集中器编号_响应"),
	REQ_SLAVE_STATION_ID(143, "从站编号_请求"),
	REQ_CONCENTRATOR_NO(144, "集中器编号_请求"),
	REQ_HEART_PERIOD(145, "心跳周期_请求"),
	REQ_METER_NO(146, "表具编号_请求"),
	RESP_COLLECTOR_NO(147, "采集器编号_响应"),
	RESP_METER_NO(149, "表具编号_响应"),
	RESP_COLLECT_STATUS(150, "抄表情况_响应"),
	REQ_COLLECTOR_NO(151, "采集器编号_请求"),
	RESP_CURRENT_VALUE_INTEGER_PART(152, "当前指数_整数部分_响应"),
	RESP_CURRENT_VALUE_DECIMAL_PART(153, "当前指数_小数部分_响应"),
	REQ_NEW_DEVICE_NO(154, "新设备编号_请求"),
	REQ_DTU_NO(155, "DTU编号_请求"),
	RESP_DTU_NO(156, "DTU编号_响应"),
	REQ_YBCSZ(157, "仪表初始值_请求"),
	RESP_YBCSZ(158, "仪表初始值_响应"),
	REQ_MCDL(159, "脉冲当量_请求"),
	RESP_MCDL(160, "脉冲当量_响应"),
	REQ_YBCSZ_ZHENGSHU(161, "仪表初始值_整数部分_请求"),
	REQ_YBCSZ_XIAOSHU(162, "仪表初始值_小数部分_请求"),
	RESP_YBCSZ_ZHENGSHU(163, "仪表初始值_整数部分_响应"),
	RESP_YBCSZ_XIAOSHU(164, "仪表初始值_小数部分_响应"),
	REQ_MCDL_ZHENGSHU(165, "脉冲当量_整数部分_请求"),
	REQ_MCDL_XIAOSHU(166, "脉冲当量_小数部分_请求"),
	RESP_MCDL_ZHENGSHU(167, "脉冲当量_整数部分_响应"),
	RESP_MCDL_XIAOSHU(168, "脉冲当量_小数部分_响应"),
	REQ_LUYOUCANSHU(169, "路由参数_请求"),
	REQ_DIZHIBIANHAO(170, "地址编号_请求"),
	REQ_JICHAORIQI(171, "集抄日期_请求"),
	RESP_JICHAORIQI(172, "集抄日期_响应"),
	REQ_JICHAOSHIJIAN(173, "集抄时间_请求"),
	RESP_JICHAOSHIJIAN(174, "集抄时间_响应"),
	RESP_BIAOJUZHISHU(175, "表具指数_响应"),
	RESP_BIAOZHUNRIQI(176, "标准日期_响应"),
	RESP_BIAOZHUNSHIJIAN(177, "标准时间_响应"),
	RESP_XINHAOQIANGDU(178, "信号强度_响应"),
	RESP_DIANCHIDIANYA(179, "电池电压_响应"),
	RESP_BIAOJUZHUANGTAI(180, "表具状态_响应"),
	REQ_FASHENGRIQI(181, "发生日期_请求"),
	REQ_FASHENGSHIJIAN(182, "发生时间_请求"),
	REQ_YICHANGLEIXING(183, "异常类型_请求"),
	RESP_BIAOJUZHISHU_ZHENGSHU(184, "表具指数_整数部分_响应"),
	RESP_BIAOJUZHISHU_XIAOSHU(185, "表具指数_小数部分_响应");
	private int id;
	private String name;
	private MessageFieldKeyEnum(int id, String name) {
		this.id = id;
		this.name = name;
	}

	public int getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public static MessageFieldKeyEnum getEnumByEnumName(String EnumName) {
		for (MessageFieldKeyEnum value : MessageFieldKeyEnum.values()) {
			if (value.toString().equals(EnumName)) {
				return value;
			}
		}
		return null;
	}
	public static MessageFieldKeyEnum getEnumByName(String name) {
		for (MessageFieldKeyEnum value : MessageFieldKeyEnum.values()) {
			if (value.getName().equals(name)) {
				return value;
			}
		}
		return null;
	}
	public static MessageFieldKeyEnum getEnumByid(int id) {
		for (MessageFieldKeyEnum value : MessageFieldKeyEnum.values()) {
			if (value.getId() == id) {
				return value;
			}
		}
		return null;
	}
}
